<?php
class FeedBackController extends BaseController
{
	public function showView()
	{
		if(Auth::check())
		{
			$email=Auth::user()->email;
			$surname=Auth::user()->userInfo->surname;
			$givenName=Auth::user()->userInfo->given_name;
			$name=$surname.$givenName;
			return View::make('user.loginfeedback')->with(['email'=>$email])->with(['name'=>$name]);
		}
		else
		{
			return View::make('user.feedback');
		}
	}

	/**
	 * 反馈信息控制器
	 * @Author   leikes
	 * @datetime 2016-02-16T14:00:31+0800
	 * @return   json                   [errCode,message]
	 */
	public function feedBack()
	{
		$data=Input::all();
		$feedBackService=new FeedBackService;
		$errInfo=$feedBackService->feedBackInfo($data);
		return Response::json($errInfo);
	}
}
?>